3.89 \(\int \frac {(d+e x)^2 (a+b \log (c x^n))^2}{x^3} \, dx\)

Optimal. Leaf size=137 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b d^2 n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {b^2 d^2 n^2}{4 x^2}-\frac {4 b^2 d e n^2}{x} \]

[Out]

-1/4*b^2*d^2*n^2/x^2-4*b^2*d*e*n^2/x-1/2*b*d^2*n*(a+b*ln(c*x^n))/x^2-4*b*d*e*n*(a+b*ln(c*x^n))/x-1/2*d^2*(a+b*
ln(c*x^n))^2/x^2-2*d*e*(a+b*ln(c*x^n))^2/x+1/3*e^2*(a+b*ln(c*x^n))^3/b/n

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2353, 2305, 2304, 2302, 30} \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b d^2 n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {b^2 d^2 n^2}{4 x^2}-\frac {4 b^2 d e n^2}{x} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^3,x]

[Out]

-(b^2*d^2*n^2)/(4*x^2) - (4*b^2*d*e*n^2)/x - (b*d^2*n*(a + b*Log[c*x^n]))/(2*x^2) - (4*b*d*e*n*(a + b*Log[c*x^
n]))/x - (d^2*(a + b*Log[c*x^n])^2)/(2*x^2) - (2*d*e*(a + b*Log[c*x^n])^2)/x + (e^2*(a + b*Log[c*x^n])^3)/(3*b
*n)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rubi steps

\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx &=\int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}\right ) \, dx\\ &=d^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx+(2 d e) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx+e^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\\ &=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e^2 \operatorname {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}+\left (b d^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx+(4 b d e n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {b^2 d^2 n^2}{4 x^2}-\frac {4 b^2 d e n^2}{x}-\frac {b d^2 n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 117, normalized size = 0.85 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b d^2 n \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{4 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )+b n\right )}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^3,x]

[Out]

-1/2*(d^2*(a + b*Log[c*x^n])^2)/x^2 - (2*d*e*(a + b*Log[c*x^n])^2)/x + (e^2*(a + b*Log[c*x^n])^3)/(3*b*n) - (4
*b*d*e*n*(a + b*n + b*Log[c*x^n]))/x - (b*d^2*n*(2*a + b*n + 2*b*Log[c*x^n]))/(4*x^2)

________________________________________________________________________________________

fricas [B]  time = 0.61, size = 291, normalized size = 2.12 \[ \frac {4 \, b^{2} e^{2} n^{2} x^{2} \log \relax (x)^{3} - 3 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n - 6 \, a^{2} d^{2} - 6 \, {\left (4 \, b^{2} d e x + b^{2} d^{2}\right )} \log \relax (c)^{2} + 6 \, {\left (2 \, b^{2} e^{2} n x^{2} \log \relax (c) - 4 \, b^{2} d e n^{2} x + 2 \, a b e^{2} n x^{2} - b^{2} d^{2} n^{2}\right )} \log \relax (x)^{2} - 24 \, {\left (2 \, b^{2} d e n^{2} + 2 \, a b d e n + a^{2} d e\right )} x - 6 \, {\left (b^{2} d^{2} n + 2 \, a b d^{2} + 8 \, {\left (b^{2} d e n + a b d e\right )} x\right )} \log \relax (c) + 6 \, {\left (2 \, b^{2} e^{2} x^{2} \log \relax (c)^{2} - b^{2} d^{2} n^{2} + 2 \, a^{2} e^{2} x^{2} - 2 \, a b d^{2} n - 8 \, {\left (b^{2} d e n^{2} + a b d e n\right )} x - 2 \, {\left (4 \, b^{2} d e n x - 2 \, a b e^{2} x^{2} + b^{2} d^{2} n\right )} \log \relax (c)\right )} \log \relax (x)}{12 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")

[Out]

1/12*(4*b^2*e^2*n^2*x^2*log(x)^3 - 3*b^2*d^2*n^2 - 6*a*b*d^2*n - 6*a^2*d^2 - 6*(4*b^2*d*e*x + b^2*d^2)*log(c)^
2 + 6*(2*b^2*e^2*n*x^2*log(c) - 4*b^2*d*e*n^2*x + 2*a*b*e^2*n*x^2 - b^2*d^2*n^2)*log(x)^2 - 24*(2*b^2*d*e*n^2
+ 2*a*b*d*e*n + a^2*d*e)*x - 6*(b^2*d^2*n + 2*a*b*d^2 + 8*(b^2*d*e*n + a*b*d*e)*x)*log(c) + 6*(2*b^2*e^2*x^2*l
og(c)^2 - b^2*d^2*n^2 + 2*a^2*e^2*x^2 - 2*a*b*d^2*n - 8*(b^2*d*e*n^2 + a*b*d*e*n)*x - 2*(4*b^2*d*e*n*x - 2*a*b
*e^2*x^2 + b^2*d^2*n)*log(c))*log(x))/x^2

________________________________________________________________________________________

giac [B]  time = 0.44, size = 325, normalized size = 2.37 \[ \frac {4 \, b^{2} n^{2} x^{2} e^{2} \log \relax (x)^{3} - 24 \, b^{2} d n^{2} x e \log \relax (x)^{2} + 12 \, b^{2} n x^{2} e^{2} \log \relax (c) \log \relax (x)^{2} - 48 \, b^{2} d n^{2} x e \log \relax (x) - 48 \, b^{2} d n x e \log \relax (c) \log \relax (x) + 12 \, b^{2} x^{2} e^{2} \log \relax (c)^{2} \log \relax (x) - 6 \, b^{2} d^{2} n^{2} \log \relax (x)^{2} + 12 \, a b n x^{2} e^{2} \log \relax (x)^{2} - 48 \, b^{2} d n^{2} x e - 48 \, b^{2} d n x e \log \relax (c) - 24 \, b^{2} d x e \log \relax (c)^{2} - 6 \, b^{2} d^{2} n^{2} \log \relax (x) - 48 \, a b d n x e \log \relax (x) - 12 \, b^{2} d^{2} n \log \relax (c) \log \relax (x) + 24 \, a b x^{2} e^{2} \log \relax (c) \log \relax (x) - 3 \, b^{2} d^{2} n^{2} - 48 \, a b d n x e - 6 \, b^{2} d^{2} n \log \relax (c) - 48 \, a b d x e \log \relax (c) - 6 \, b^{2} d^{2} \log \relax (c)^{2} - 12 \, a b d^{2} n \log \relax (x) + 12 \, a^{2} x^{2} e^{2} \log \relax (x) - 6 \, a b d^{2} n - 24 \, a^{2} d x e - 12 \, a b d^{2} \log \relax (c) - 6 \, a^{2} d^{2}}{12 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="giac")

[Out]

1/12*(4*b^2*n^2*x^2*e^2*log(x)^3 - 24*b^2*d*n^2*x*e*log(x)^2 + 12*b^2*n*x^2*e^2*log(c)*log(x)^2 - 48*b^2*d*n^2
*x*e*log(x) - 48*b^2*d*n*x*e*log(c)*log(x) + 12*b^2*x^2*e^2*log(c)^2*log(x) - 6*b^2*d^2*n^2*log(x)^2 + 12*a*b*
n*x^2*e^2*log(x)^2 - 48*b^2*d*n^2*x*e - 48*b^2*d*n*x*e*log(c) - 24*b^2*d*x*e*log(c)^2 - 6*b^2*d^2*n^2*log(x) -
 48*a*b*d*n*x*e*log(x) - 12*b^2*d^2*n*log(c)*log(x) + 24*a*b*x^2*e^2*log(c)*log(x) - 3*b^2*d^2*n^2 - 48*a*b*d*
n*x*e - 6*b^2*d^2*n*log(c) - 48*a*b*d*x*e*log(c) - 6*b^2*d^2*log(c)^2 - 12*a*b*d^2*n*log(x) + 12*a^2*x^2*e^2*l
og(x) - 6*a*b*d^2*n - 24*a^2*d*x*e - 12*a*b*d^2*log(c) - 6*a^2*d^2)/x^2

________________________________________________________________________________________

maple [C]  time = 0.51, size = 2520, normalized size = 18.39 \[ \text {Expression too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(b*ln(c*x^n)+a)^2/x^3,x)

[Out]

-1/2*b^2*(-2*e^2*x^2*ln(x)+4*d*e*x+d^2)/x^2*ln(x^n)^2-1/2*b*(-2*I*ln(x)*Pi*b*e^2*csgn(I*c*x^n)^2*csgn(I*c)*x^2
-2*I*ln(x)*Pi*b*e^2*csgn(I*x^n)*csgn(I*c*x^n)^2*x^2-4*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-4*I*Pi*
b*d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I*x^n)*csgn(I*c*x^n)^2+24*I*ln(x)*ln(
c)*Pi*b^2*e^2*csgn(I*x^n)*csgn(I*c*x^n)^2*x^2+3*Pi^2*b^2*d^2*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2-24*ln(x
)*Pi^2*b^2*e^2*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)*x^2+12*ln(x)*Pi^2*b^2*e^2*csgn(I*x^n)*csgn(I*c*x^n)^3*csg
n(I*c)^2*x^2-6*ln(x)*Pi^2*b^2*e^2*csgn(I*c*x^n)^6*x^2-12*I*ln(x)^2*Pi*b^2*e^2*n*csgn(I*c*x^n)^2*csgn(I*c)*x^2-
48*I*n*Pi*b^2*d*e*x*csgn(I*c*x^n)^2*csgn(I*c)-24*Pi^2*b^2*d*e*x*csgn(I*c)*csgn(I*x^n)^2*csgn(I*c*x^n)^3+12*Pi^
2*b^2*d*e*x*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2-96*b^2*d*e*n^2*x+12*Pi^2*b^2*d*e*x*csgn(I*c*x^n)^6-96*a*
b*d*e*x*ln(c)-96*b^2*d*e*n*x*ln(c)+48*Pi^2*b^2*d*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)^4-24*Pi^2*b^2*d*e*x*c
sgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3+12*I*Pi*b^2*d^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*ln(c)+12*I*Pi*a*b*d
^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+6*I*Pi*b^2*d^2*n*csgn(I*c*x^n)^3)/x^2

________________________________________________________________________________________

maxima [A]  time = 0.69, size = 210, normalized size = 1.53 \[ \frac {b^{2} e^{2} \log \left (c x^{n}\right )^{3}}{3 \, n} - 4 \, b^{2} d e {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} - \frac {1}{4} \, b^{2} d^{2} {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} + \frac {a b e^{2} \log \left (c x^{n}\right )^{2}}{n} - \frac {2 \, b^{2} d e \log \left (c x^{n}\right )^{2}}{x} + a^{2} e^{2} \log \relax (x) - \frac {4 \, a b d e n}{x} - \frac {4 \, a b d e \log \left (c x^{n}\right )}{x} - \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b d^{2} n}{2 \, x^{2}} - \frac {2 \, a^{2} d e}{x} - \frac {a b d^{2} \log \left (c x^{n}\right )}{x^{2}} - \frac {a^{2} d^{2}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")

[Out]

1/3*b^2*e^2*log(c*x^n)^3/n - 4*b^2*d*e*(n^2/x + n*log(c*x^n)/x) - 1/4*b^2*d^2*(n^2/x^2 + 2*n*log(c*x^n)/x^2) +
 a*b*e^2*log(c*x^n)^2/n - 2*b^2*d*e*log(c*x^n)^2/x + a^2*e^2*log(x) - 4*a*b*d*e*n/x - 4*a*b*d*e*log(c*x^n)/x -
 1/2*b^2*d^2*log(c*x^n)^2/x^2 - 1/2*a*b*d^2*n/x^2 - 2*a^2*d*e/x - a*b*d^2*log(c*x^n)/x^2 - 1/2*a^2*d^2/x^2

________________________________________________________________________________________

mupad [B]  time = 3.77, size = 221, normalized size = 1.61 \[ \ln \relax (x)\,\left (a^2\,e^2+3\,a\,b\,e^2\,n+\frac {9\,b^2\,e^2\,n^2}{2}\right )-\frac {x\,\left (4\,d\,e\,a^2+8\,d\,e\,a\,b\,n+8\,d\,e\,b^2\,n^2\right )+a^2\,d^2+\frac {b^2\,d^2\,n^2}{2}+a\,b\,d^2\,n}{2\,x^2}-{\ln \left (c\,x^n\right )}^2\,\left (\frac {\frac {b^2\,d^2}{2}+2\,b^2\,d\,e\,x+\frac {3\,b^2\,e^2\,x^2}{2}}{x^2}-\frac {b\,e^2\,\left (2\,a+3\,b\,n\right )}{2\,n}\right )-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,\left (2\,a+b\,n\right )\,d^2}{2}+4\,b\,\left (a+b\,n\right )\,d\,e\,x+\frac {3\,b\,\left (2\,a+3\,b\,n\right )\,e^2\,x^2}{2}\right )}{x^2}+\frac {b^2\,e^2\,{\ln \left (c\,x^n\right )}^3}{3\,n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))^2*(d + e*x)^2)/x^3,x)

[Out]

log(x)*(a^2*e^2 + (9*b^2*e^2*n^2)/2 + 3*a*b*e^2*n) - (x*(4*a^2*d*e + 8*b^2*d*e*n^2 + 8*a*b*d*e*n) + a^2*d^2 +
(b^2*d^2*n^2)/2 + a*b*d^2*n)/(2*x^2) - log(c*x^n)^2*(((b^2*d^2)/2 + (3*b^2*e^2*x^2)/2 + 2*b^2*d*e*x)/x^2 - (b*
e^2*(2*a + 3*b*n))/(2*n)) - (log(c*x^n)*((b*d^2*(2*a + b*n))/2 + (3*b*e^2*x^2*(2*a + 3*b*n))/2 + 4*b*d*e*x*(a
+ b*n)))/x^2 + (b^2*e^2*log(c*x^n)^3)/(3*n)

________________________________________________________________________________________

sympy [A]  time = 9.29, size = 357, normalized size = 2.61 \[ - \frac {a^{2} d^{2}}{2 x^{2}} - \frac {2 a^{2} d e}{x} + a^{2} e^{2} \log {\relax (x )} - \frac {a b d^{2} n}{2 x^{2}} - \frac {a b d^{2} \log {\left (c x^{n} \right )}}{x^{2}} - \frac {4 a b d e n}{x} - \frac {4 a b d e \log {\left (c x^{n} \right )}}{x} - 2 a b e^{2} \left (\begin {cases} - \log {\relax (c )} \log {\relax (x )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) - \frac {b^{2} d^{2} n^{2} \log {\relax (x )}^{2}}{2 x^{2}} - \frac {b^{2} d^{2} n^{2} \log {\relax (x )}}{2 x^{2}} - \frac {b^{2} d^{2} n^{2}}{4 x^{2}} - \frac {b^{2} d^{2} n \log {\relax (c )} \log {\relax (x )}}{x^{2}} - \frac {b^{2} d^{2} n \log {\relax (c )}}{2 x^{2}} - \frac {b^{2} d^{2} \log {\relax (c )}^{2}}{2 x^{2}} - \frac {2 b^{2} d e n^{2} \log {\relax (x )}^{2}}{x} - \frac {4 b^{2} d e n^{2} \log {\relax (x )}}{x} - \frac {4 b^{2} d e n^{2}}{x} - \frac {4 b^{2} d e n \log {\relax (c )} \log {\relax (x )}}{x} - \frac {4 b^{2} d e n \log {\relax (c )}}{x} - \frac {2 b^{2} d e \log {\relax (c )}^{2}}{x} - b^{2} e^{2} \left (\begin {cases} - \log {\relax (c )}^{2} \log {\relax (x )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{3}}{3 n} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**2/x**3,x)

[Out]

-a**2*d**2/(2*x**2) - 2*a**2*d*e/x + a**2*e**2*log(x) - a*b*d**2*n/(2*x**2) - a*b*d**2*log(c*x**n)/x**2 - 4*a*
b*d*e*n/x - 4*a*b*d*e*log(c*x**n)/x - 2*a*b*e**2*Piecewise((-log(c)*log(x), Eq(n, 0)), (-log(c*x**n)**2/(2*n),
 True)) - b**2*d**2*n**2*log(x)**2/(2*x**2) - b**2*d**2*n**2*log(x)/(2*x**2) - b**2*d**2*n**2/(4*x**2) - b**2*
d**2*n*log(c)*log(x)/x**2 - b**2*d**2*n*log(c)/(2*x**2) - b**2*d**2*log(c)**2/(2*x**2) - 2*b**2*d*e*n**2*log(x
)**2/x - 4*b**2*d*e*n**2*log(x)/x - 4*b**2*d*e*n**2/x - 4*b**2*d*e*n*log(c)*log(x)/x - 4*b**2*d*e*n*log(c)/x -
 2*b**2*d*e*log(c)**2/x - b**2*e**2*Piecewise((-log(c)**2*log(x), Eq(n, 0)), (-log(c*x**n)**3/(3*n), True))

________________________________________________________________________________________